QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Cylinders

A cylinder is a three-dimensional object defined by an origin (that is, the center of the base) and three mutually perpendicular vectors that define the orientation and the major and minor radii of the cylinder. A cylinder is defined by the TQ3CylinderData data type. See "Creating and Editing Cylinders" for a description of the routines you can use to create and edit cylinders. Figure 32 shows a cylinder.

Figure 32 A cylinder

typedef struct TQ3CylinderData {
    TQ3Point3D                          origin;
    TQ3Vector3D                         orientation;
    TQ3Vector3D                         majorRadius;
    TQ3Vector3D                         minorRadius;
    float                               uMin, uMax, vMin, vMax;
    TQ3EndCap                           caps;
    TQ3AttributeSet                     interiorAttributeSet;
    TQ3AttributeSet                     topAttributeSet;
    TQ3AttributeSet                     faceAttributeSet;
    TQ3AttributeSet                     bottomAttributeSet;
    TQ3AttributeSet                     cylinderAttributeSet;
} TQ3CylinderData;
origin
The origin (that is, the center of the base) of the cylinder.
orientation
The orientation of the cylinder.
majorRadius
The major radius of the cylinder.
minorRadius
The minor radius of the cylinder.
uMin
The minimum value in the u parametric direction of the cylinder. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
uMax
The maximum value in the u parametric direction of the cylinder. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
vMin
The minimum value in the v parametric direction of the cylinder. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
vMax
The maximum value in the v parametric direction of the cylinder. This value should be greater than or equal to 0.0 and less than or equal to 1.0.
caps
The style of caps to be used on the cylinder ends. See "End Caps Masks" for a description of the masks you can use to specify a value for this field.
interiorAttributeSet
A set of cylinder interior attributes.
topAttributeSet
A set of cylinder top attributes.
faceAttributeSet
A set of cylinder face attributes.
bottomAttributeSet
A set of cylinder bottom attributes.
cylinderAttributeSet
A set of attributes for the cylinder. The value in this field is NULL if no cylinder attributes are defined.

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |